package com.xiangying.exception;

import com.xiangying.entity.common.ResultEnum;

/**
 * 自定义异常类
 * @author luolihong
 *
 */
public class BusinessException extends RuntimeException{
	
	private static final long serialVersionUID = -434787535652722446L;
	
	private Integer code;

    public BusinessException(ResultEnum resultEnum) {
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
